package com.matt.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.tuo51.foudation.model.Model;
import io.swagger.models.auth.In;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;

/**
 * @author mengzhichao
 * @create 2025-02-24-14:42
 */

@Entity
@Data
@Table(name = "children_vaccine")
@NoArgsConstructor
@EqualsAndHashCode(callSuper=false)
public class ChildrenVaccine extends Model {

    //疫苗类型
    private String type;

    //宝宝姓名
    private String name;

    //班级id
    private String classesId;

    //宝宝id
    private String childrenId;

    //接种状态（0未接种，1已接种）
    private Integer state;

    //接种时间
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+08:00")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date inoculateTime;

    //备注
    private String remark;

    //创建时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    //创建人id
    private String createUserId;

    //创建人名字
    private String createUserName;

    //月龄
    @Transient
    private Integer age;

    //所属园区
    private String aid;

}
